package com.globallogic.vacationplanner.transfer.service;

import java.io.Serializable;
import java.util.List;

import com.globallogic.vacationplanner.transfer.dto.impl.ProjectDto;
import com.globallogic.vacationplanner.transfer.dto.impl.UserDto;

public interface IProjectService extends Serializable {

	/**
	 * Create the project. Setting creator as member of created project.
	 * 
	 * @param projectDto
	 * @throws ProjectException
	 */
	void createProject(ProjectDto projectDto);

	/**
	 * Getting list of all users,except project creator
	 * 
	 * @param user
	 * @return list
	 */
	List<UserDto> fillUsersList(UserDto user);

	/**
	 * User leave the project
	 * 
	 * @param user
	 */
	void userLeaveProject(ProjectDto dto,UserDto user);

	/**
	 * Getting user and member projects
	 * 
	 * @param user
	 * @return list
	 */
	List<ProjectDto> getUserMemberedProjects(UserDto user);

	/**
	 * Getting user own projects
	 * @param user
	 * @return list
	 */
	List<ProjectDto> getUserOwnProjects(UserDto user);

	/**
	 * Find User by login
	 * 
	 * @param login
	 * @return user data transfer object
	 */
	UserDto findUser(String login);

	/**
	 * Getting all creating projects
	 * 
	 * @return list
	 */
	List<ProjectDto> getAllProject();
	
	/**
	 * Editing user own project
	 * @param dto
	 * @param user
	 */
	void edtiUserOwnProject(ProjectDto dto);
}
